<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateRedeemLogsTable extends Migration
{
	public function up()
	{
		Schema::create('redeem_logs', function(Blueprint $table) {
            $table->increments('id');
            $table->integer('company_userid')->unsigned()->index()->comment('商家用户ID');
            $table->integer('user_id')->unsigned()->index()->comment('用户ID');
            $table->integer('prize_id')->unsigned()->index()->comment('奖品ID');
            $table->integer('filiale_id')->unsigned()->index()->comment('商家分店ID');
            $table->text('remark')->nullable()->comment('描述');
            $table->timestamps();
        });
	}

	public function down()
	{
		Schema::drop('redeem_logs');
	}
}
